package com.itjcloud.iot.gateway.model;


import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 服务调用异常
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class ServiceRequestException extends RuntimeException {

    private String msg;

    private String code;


    private String userTip;


    public ServiceRequestException(Result<?> result, String userTip) {
        super(userTip);
        this.msg = result.getMsg();
        this.code = String.valueOf(result.getCode());
        this.userTip = userTip;
    }
}
